<template>
  <div>
    <!-- 三级联动组件 -->
    <TypeNav />

    <!--列表-->
    <ListContainer />

    <!--今日推荐-->
    <Recommend />

    <!-- 商品排行 -->

    <Rank />

    <!-- 猜你喜欢 -->
    <Like />

    <!--楼层-->
    <Floor v-for="f in floorList" :key="f.id" :itemList="f"/>

    <!--商标-->
    <Brand />
    
  </div>
</template>

<script>
import { mapState } from "vuex";
import ListContainer from "./ListContainer";
import Recommend from "./Recommend";
import Rank from "./Rank";
import Like from "./Like";
import Floor from "./Floor";
import Brand from "./Brand";
export default {
  name: "Home",
  components: {
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
  mounted(){
    this.$store.dispatch("getFloorList")
  },
  computed:{
    ...mapState({
      floorList:state => state.home.floorList
    })
  }
};
</script>

<style lang="less" scoped>
</style>